<template>
	<view class="question-item" @click="navTo(`/pages/question/details?id=${item.id}`)">
		<text class="title text-ellipsis">{{item.title}}</text>
		<!-- space-between  flex布局  全局两端对齐 -->
		<view class="foot space-between"> 
			<view class="info-left">
				<text>{{item.reply}}回答</text>
				<text>{{item.viewCount}}浏览</text>
			</view>

			<view class="info-right">
				<text>{{item.nickName}}</text>
				<text>{{ $util.dateFormat(item.updateDate) }}</text>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			item:{
				type:Object,
				default:  ()=>({
					id:1,
					title:'你好我是title',
					reply:199,
					viewCount:1000,
					nickName:'黄先生',
					updateDatae:new Date()
				})
			}
		},
		
	}
</script>

<style lang="scss">
	.question-item{
		padding: 30rpx;
		border-bottom: 1rpx solid #f1f1f1;
		min-height: 80rpx;
		.title{
			font-size: 30rpx;
			font-weight: bold;
		}
		.foot{
			margin-top: 15rpx;
			text{
				font-size: 26rpx;
				color: #999;
				padding-right: 20rpx;
			}
		}
		
	}
	
</style>
